package com.xx.happychatboot.serve.user.service.impl;

import com.xx.happychatboot.serve.user.domain.entity.SysRole;
import com.xx.happychatboot.serve.user.mapper.SysRoleMapper;
import com.xx.happychatboot.serve.user.service.ISysRoleService;
import io.mybatis.service.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysRoleServiceImpl extends AbstractService<SysRole, Long, SysRoleMapper> implements ISysRoleService {

    @Autowired
    private SysRoleMapper sysRoleMapper;

    @Override
    public List<SysRole> getRolesByUid(Long userId) {
        return sysRoleMapper.getRolesByUid(userId);
    }

    @Override
    public List<String> getRoleByUrl(String url) {
        return sysRoleMapper.getRoleByUrl(url);
    }

    @Override
    public SysRole selectByRoleCode(String code) {
        return sysRoleMapper.selectByRoleCode(code);
    }
}
